<?php

include "../../../lib/start.php";

check_session();

$campo = $_POST['campo'];
$value = $_POST['value'];
$update = "UPDATE reg_classi SET $campo = '".$value."' WHERE id_reg = ".$_SESSION['registro']['id_reg'];
$r_upd = $db->executeUpdate($update);

$upd_alunni = "UPDATE reg_alunni SET $campo = '".$value."' WHERE id_registro = ".$_SESSION['registro']['id_reg'];
$_SESSION['query'] = $upd_alunni;
$r_upd_alunni = $db->executeUpdate($upd_alunni);

?>